import {
    defineStore
} from 'pinia';
import type TagModel from '../class/TagModel';
// import TreeModel from '../class/TreeMenu';
import { createPersistedState } from 'pinia-plugin-persistedstate';
import type TreeModel from '../class/TreeMenu';
const useStore = defineStore("main", {
    state:()=>{
        return {
            Token:"",
            isCollapse:false,
            tags:[] as TagModel[],
            UserMenus:[] as TreeModel[],
            RefreshTokenNum:0,
        }
    },
persist:{
    enabled: true,
    strategies:[{
        key:"site",
        storage:localStorage
        
    }]

}});

export default useStore;